function myFunction() {

    var person = {
    	firstname: "John",
    	lastname: "Doe",
    	id:  "5566",
    	fullname: function(){
    		return this.firstname + " " + this.lastname;
    	}
    }

    function myfun1(a, b) {
    	return a * b;
    }

    function myfun2(fast) {
    	return (5/9) * (fast-32)
    }

    function myfun3(){
    	// var carname = "volvo";	//var定义成局部变量
    	carname = "volvo";			//全局变量
    }

    // document.getElementById("demo").innerHTML = Date();
    // document.getElementById("demo").innerHTML = person.fullname();
    // document.getElementById("demo").innerHTML = myfun1(3, 4);
    // document.getElementById("demo").innerHTML = "got it...";

    myfun3();
	document.getElementById('demo1').innerHTML = "====== "+ window.carname +" =====";	//window调全局变量

    console.log('you got it!!!')	//debug in page console
}

/*
var o = document.getElementById('demo');
undefined

o.style.fontSize = '50px'
"50px"

o.style.fontSize = '100px'
"100px"

o.style.color = 'Red'
"Red"

var x = 100 / "apple"
undefined
x
NaN

var x = 100 + "10"
undefined
x
"10010"

x
"10010"
Number(x)
10010


x
"10010"
parseInt(x)
10010
typeof parseInt(x)
"number"

parseInt("10");         // returns 10
parseInt("10.33");      // returns 10
parseInt("10 20 30");   // returns 10
parseInt("10 years");   // returns 10
parseInt("years 10");   // returns NaN

#判断类型是不是string
function isArray(myArray) {
    return myArray.constructor.toString().indexOf("Array") > -1;
}

var x = function(a,b){return a*b }

*/